<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8" isELIgnored="false" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="shiro" uri="http://shiro.apache.org/tags" %>


<div style="overflow-y:auto; overflow-x:auto; max-height: 370px;  padding-left: 200px ">
    <div class="col-sm-offset-1 col-sm-8">
        <ul id="treeDemo" class="ztree"></ul>
    </div>

    <div class="col-sm-2">
        <shiro:hasPermission name="expertInfo:adminEdit:edit">
            <button id="btn_add_expertMajor" type="button" class="btn btn-default"><span
                    class="glyphicon glyphicon-edit"></span> 修改
            </button>
        </shiro:hasPermission>
    </div>
</div>


<script>
    $("#btn_add_expertMajor").click(function () {
        $('#modal_ajax').modal({
            backdrop: 'static',
            keyboard: false,
            show: true,
            remote: 'expertInfo/adminEdit/expertMajor/editDlg?expertId=' + $('#commonExpertId').val()
        });
    });

</script>
<SCRIPT type="text/javascript">
    var setting = {
        data: {
            simpleData: {
                enable: true
            }
        }
    };
    var zNodes =${data};
    $(document).ready(function () {
        $.fn.zTree.init($("#treeDemo"), setting, zNodes);
        //展开第一级
        var treeObj = $.fn.zTree.getZTreeObj("treeDemo");
        $.each(treeObj.getNodes(), function (i, v) {
            treeObj.expandNode(v, true, false, true);
        });
    });
</SCRIPT>